import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./assets/css/reset.css";
import "./assets/css/element.scss";
import "./assets/css/bootstrap.min.css";
import "./assets/css/common.css";
import Element from "element-ui";

Vue.use(Element);
Vue.config.productionTip = false;

Vue.prototype.$DeepCopy = function (val) {
  return JSON.parse(JSON.stringify(val));
};

// 配置package.json，强制浏览器清缓存
const VUE_APP_VERSION = require("../package.json").version;
const vers = window.localStorage.getItem("appVersion");
if (VUE_APP_VERSION != vers) {
  localStorage.clear();
  window.localStorage.setItem("appVersion", VUE_APP_VERSION);
  location.reload();
}

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
